import request from "@/utils/request";

enum API {
    STANDBOOK_URL = "/itp/api/standingbook",
}

export default{
    postStandbookList: (current: number, size: number, data: any) => request.post(`${API.STANDBOOK_URL}/page?current=${current}&size=${size}`, data),
    postAddStandbook: (param: any) => request.post(`${API.STANDBOOK_URL}`, param), //新增台账
    putUpdateStandbook: (param: any) => request.put(`${API.STANDBOOK_URL}`, param), //修改台账
    getStandbookDetail: (id: number) => request.get(`${API.STANDBOOK_URL}/id?id=${id}`),//台账详情
    deleteStandbook: (id: number) => request.delete(`${API.STANDBOOK_URL}?id=${id}`),//删除台账    
    getDetailList: (id: number) => request.get(`${API.STANDBOOK_URL}/detail/list?standingBookId=${id}`),//查询台账明细
    postAddStandbookDetail: (param: any) => request.post(`${API.STANDBOOK_URL}/detail`, param), //新增台账明细
    putStandbookDetail: (param: any) => request.put(`${API.STANDBOOK_URL}/detail`, param), //修改台账明细
    deleteStandbookDetail: (id: number) => request.delete(`${API.STANDBOOK_URL}/detail?id=${id}`),//删除台账明细
}